Update to jline 3.x to resolve CVE#7
Conversation
- Type ConsoleHolder.history as DefaultHistory to enable set/remove/get by index, fixing pop, shift, set, and delete_at history operations - Re-add ESC key -> BEEP binding (JRUBY-852: prevents IRB quit on ESC) - Disable DefaultHistory file persistence to match JLine 2 MemoryHistory - Warn on completion_append_character= since JLine 3 does not support it - Remove unused imports (Iterator, ListIterator, AttributedString) - Fix missing newline at end of Java files
Add test/test_readline.rb (smoke test: gem loads and basic method works) and test/test_history.rb (full Minitest suite covering HISTORY push/pop/ shift/set/delete_at/each/clear and completion_proc, tested against JRuby with Java 21 + JLine 3.21). The upstream repo had no tests; this is the first test infrastructure. Also fix history mutation methods (pop, shift, set, delete_at) to work around DefaultHistory lacking remove(int)/set(int,String) in JLine 3 by rebuilding the list via purge()+re-add. Fix ESC key binding to use Widget interface instead of Binding (which is not functional in JLine 3).
|
@headius — yes, we have tested this with JRuby. Test environment: JRuby 10.1.0.0 (Ruby 4.0.0, Java 21, JLine 3.21.0, arm64-darwin) Since this repo had no existing test infrastructure, we added the first test suite as part of this PR ( A few notes on the migration:
We understand the project is moving toward |
No description provided.